<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<title>系统主页</title>
    <link rel="stylesheet" type="text/css"
          href="plugin/jquery-easyui-1.3.3/themes/material/easyui.css">
    <link rel="stylesheet" type="text/css"
          href="plugin/jquery-easyui-1.3.3/themes/icon.css">
    <script type="text/javascript"
            src="plugin/jquery-easyui-1.3.3/jquery.min.js"></script>
    <script type="text/javascript"
            src="plugin/jquery-easyui-1.3.3/jquery.easyui.min.js"></script>
    <script type="text/javascript"
            src="plugin/jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js"></script>
    <script src="js/common.js"></script>
    <script type="text/javascript">
        checkCookie();
        
        $(function(){
        	$("#adminname").text(getCookie("adminName"));
        	$("#rolename").text(getCookie("adminRole"));
        })
        
        var url;

        function addTab(url, text, iconCls) {
            var content = "<iframe frameborder=0 scrolling='auto' style='width:100%;height:100%' src='"
                + url + "'></iframe>";
            $("#tabs").tabs("add", {
                title: text,
                iconCls: iconCls,
                closable: true,
                content: content
            });
        }

        function openTab(text, url, iconCls) {
            if ($("#tabs").tabs("exists", text)) {
                $("#tabs").tabs("close", text);
                addTab(url, text, iconCls);
                $("#tabs").tabs("select", text);
            } else {
                addTab(url, text, iconCls);
            }
        }

        function logout() {
            $.messager
                .confirm(
                    "系统提示",
                    "您确定要退出系统吗",
                    function (r) {
                        if (r) {
                        	$.ajax({
                        		type: "post",
                                url: "/admin/logout",
                                success: function(result){
                                	clearCookie();
                                }
                        	})
                        }
                    });
        }
    </script>
<body class="easyui-layout">
<div region="north" style="height: 48px;background-color:#F6F6F6 ">
    <span style="color:grey;font-size: 25px;margin-left: 20px;margin-top: 15px;">特产网后台管理系统</span>
    <font  style="color:grey;float: right;margin-right: 10px;margin-top: 10px;" size="3">&nbsp;&nbsp;<strong>当前用户：</strong>
       <span id="adminname"></span>
    </font>
</div>
<div region="center">
    <div class="easyui-tabs" fit="true" border="false" id="tabs">
        <div title="首页" data-options="iconCls:'icon-home'">
            
            <div align="center" style="">
                <img alt="" src="image/tcbg.jpg" style="width: 100%;height: 547px;">
            </div>
        </div>
    </div>
</div>
<div region="west" style="width: 200px;height:500px;color: #757575;" title="导航菜单"
     split="true">
    <div class="easyui-accordion">
        <div title="网站管理"
             style="padding:10px">
            <a
                    href="javascript:openTab(' 用户管理','Userlist.html','icon-kaoyan')"
                    class="easyui-linkbutton"
                    data-options="plain:true,iconCls:'icon-kaoyan'"
                    style="width: 150px;"> 用户管理</a>
            <a
                    href="javascript:openTab(' 商品管理','Goodslist.html','icon-sushe')"
                    class="easyui-linkbutton"
                    data-options="plain:true,iconCls:'icon-sushe'"
                    style="width: 150px;"> 商品管理</a>
            <a
                    href="javascript:openTab(' 商品类别','Typelist.html','icon-tupian')"
                    class="easyui-linkbutton"
                    data-options="plain:true,iconCls:'icon-tupian'"
                    style="width: 150px;">商品类别</a>
            <a
                    href="javascript:openTab('评论管理','Messagelist.html','icon-liuyan')"
                    class="easyui-linkbutton"
                    data-options="plain:true,iconCls:'icon-liuyan'"
                    style="width: 150px;">评论管理</a>
            <a
                    href="javascript:openTab(' 订单管理','Orderlist.html','icon-wenzhang')"
                    class="easyui-linkbutton"
                    data-options="plain:true,iconCls:'icon-wenzhang'"
                    style="width: 150px;"> 订单管理</a>
            <a
                    href="javascript:openTab('销量统计','Tongji.html','icon-tongji')"
                    class="easyui-linkbutton"
                    data-options="plain:true,iconCls:'icon-tongji'"
                    style="width: 150px;">销量统计</a>
        </div>
        <!-- <div title="联系我们" data-options="iconCls:'icon-tip'"
             style="padding:10px">
            <a
                    href="javascript:openTab(' 更新信息','cotactManage.jsp','icon-tupians')"
                    class="easyui-linkbutton"
                    data-options="plain:true,iconCls:'icon-tip'"
                    style="width: 150px;"> 更新信息</a>
        </div> -->
        <div title="系统管理"
             style="padding:10px;border:none;">
            <a href="javascript:logout()"
                            class="easyui-linkbutton"
                            data-options="plain:true,iconCls:'icon-exit'"
                            style="width: 150px;">安全退出</a>
            <!-- <a href="javascript:logout()"
                            class="easyui-linkbutton"
                            data-options="plain:true,iconCls:'icon-tip'"
                            style="width: 150px;">更改密码</a> -->
        </div>
    </div>
</div>
</body>
</html>

